package com.education.wisdom.service.impl;

import com.education.common.utils.Convert;
import com.education.wisdom.mapper.ResourcesPayMapper;
import com.education.wisdom.pojo.ResourcesPay;
import com.education.wisdom.service.IResourcesPayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 视频资源 服务层实现
 *
 * @author ruoyi
 * @date 2018-11-22
 */
@Service
public class ResourcesPayServiceImpl implements IResourcesPayService {
    @Autowired
    private ResourcesPayMapper resourcesPayMapper;

    /**
     * 查询视频资源信息
     *
     * @param id 视频资源ID
     * @return 视频资源信息
     */
    @Override
    public ResourcesPay selectResourcesPayById(Integer id) {
        return resourcesPayMapper.selectResourcesPayById(id);
    }

    /**
     * 查询视频资源列表
     *
     * @param resourcesPay 视频资源信息
     * @return 视频资源集合
     */
    @Override
    public List<ResourcesPay> selectResourcesPayList(ResourcesPay resourcesPay) {
        return resourcesPayMapper.selectResourcesPayList(resourcesPay);
    }

    /**
     * 新增视频资源
     *
     * @param resourcesPay 视频资源信息
     * @return 结果
     */
    @Override
    public int insertResourcesPay(ResourcesPay resourcesPay) {
        return resourcesPayMapper.insertResourcesPay(resourcesPay);
    }

    /**
     * 修改视频资源
     *
     * @param resourcesPay 视频资源信息
     * @return 结果
     */
    @Override
    public int updateResourcesPay(ResourcesPay resourcesPay) {
        return resourcesPayMapper.updateResourcesPay(resourcesPay);
    }

    /**
     * 删除视频资源对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteResourcesPayByIds(String ids) {
        return resourcesPayMapper.deleteResourcesPayByIds(Convert.toStrArray(ids));
    }

    @Override
    public ResourcesPay selectResourcesPayByMap(Map<String, Object> map) {
        return resourcesPayMapper.selectResourcesPayByMap(map);
    }

}
